home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Optimisation & Diagnostics
/
UpdateStar 2.5
/
UpdateStar_ENU.msi
/
NewsXsl
< prev
next >
Wrap
Extensible Markup Language
|
2008-04-16
|
8KB
|
289 lines
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="servernews/stylepath"></xsl:template>
<xsl:template match="servernews/language"></xsl:template>
<xsl:template match="servernews/largefont"></xsl:template>
<xsl:variable name="language"><xsl:value-of select="servernews/language"/></xsl:variable>
<xsl:variable name="stylepathorig"><xsl:value-of select="servernews/stylepath"/></xsl:variable>
<xsl:variable name="largefont"><xsl:value-of select="servernews/largefont"/></xsl:variable>
<xsl:variable name="stylepath"><xsl:copy-of select="$stylepathorig"/>\img\</xsl:variable>
<xsl:template match="servernews/newslist">
<html><head>
<xsl:element name="link">
<xsl:attribute name="href"><xsl:copy-of select="$stylepathorig"/>/style.css</xsl:attribute>
<xsl:attribute name="rel">stylesheet</xsl:attribute>
<xsl:attribute name="type">text/css</xsl:attribute>
</xsl:element>
<xsl:if test="$largefont='yes'">
<style type="text/css">
td {
font-size: 15px;
}
td.desc{
font-size:13px;
}
td.normal{
font-size:13px;
}
td.normalbig{
font-size:13px;
}
a.sublink{
font-size:11px;
font-weight:bold;
}
</style>
</xsl:if>
<!--
<xsl:element name="SCRIPT">
<xsl:attribute name="language">JavaScript</xsl:attribute>
<xsl:attribute name="SRC"><xsl:copy-of select="$stylepathorig"/>\<xsl:copy-of select="$language"/>.js</xsl:attribute>
</xsl:element>
<xsl:element name="SCRIPT">
<xsl:attribute name="language">JavaScript</xsl:attribute>
<xsl:attribute name="SRC"><xsl:copy-of select="$stylepathorig"/>\slang.js</xsl:attribute>
</xsl:element>
-->
<xsl:element name="SCRIPT">
<xsl:attribute name="language">JavaScript</xsl:attribute>
function translate(){
for (newalt in sfields) {
sfields[newalt] = window.external.GetString(sfields[newalt]);
if(document.getElementById(newalt) ){
if(document.getElementById(newalt).alt){//image
document.getElementById(newalt).alt=sfields[newalt];
}else if(document.getElementById(newalt).value == ""){//input
document.getElementById(newalt).value=sfields[newalt];
}else{
document.getElementById(newalt).innerHTML=sfields[newalt];//default div element
}
}
if(document.getElementById(newalt + "_" + 0)){
document.getElementById(newalt + "_" + 0).innerHTML=sfields[newalt];
}
if(document.getElementById(newalt + "_" + 1)){
document.getElementById(newalt + "_" + 1).innerHTML=sfields[newalt];
}
if(document.getElementById(newalt + "_" + 2)){
document.getElementById(newalt + "_" + 2).innerHTML=sfields[newalt];
}
if(document.getElementById(newalt + "_" + 3)){
document.getElementById(newalt + "_" + 3).innerHTML=sfields[newalt];
}
if(document.getElementById(newalt + "_" + 4)){
document.getElementById(newalt + "_" + 4).innerHTML=sfields[newalt];
}
if(document.getElementById(newalt + "_" + 5)){
document.getElementById(newalt + "_" + 5).innerHTML=sfields[newalt];
}
}
}
var sfields = new Array();
sfields["str_noupdate"] = 600;
sfields["str_yesupdate"] = 601;
sfields["str_lastscan"] = 602;
sfields["str_foundprogs"] = 603;
sfields["str_foundupdates"] = 604;
sfields["searchbutton"] = 605;
sfields["listbutton"] = 606;
sfields["str_availupdates"] = 607;
sfields["str_availvers"] = 608;
sfields["str_availnews"] = 609;
sfields["str_pname"] = 610;
sfields["str_publisher"] = 611;
sfields["str_category"] = 612;
sfields["str_license"] = 613;
sfields["str_irequirements"]= 614;
sfields["str_iversion"] = 615;
sfields["str_uversion"] = 616;
sfields["str_management"] = 617;
sfields["str_info"] = 618;
sfields["str_sdesc"] = 619;
sfields["str_desc"] = 620;
sfields["str_download"] = 621;
sfields["str_buynow"] = 622;
sfields["str_getprice"] = 623;
sfields["str_buyfrom"] = 624;
sfields["str_errlink"] = 625;
sfields["str_sendupdate"] = 626;
sfields["sendupdate"] = 626;
sfields["alt_uninstall"] = 627;
sfields["alt_repair"] = 629;
sfields["alt_modify"] = 628;
sfields["str_ranking"] = 630;
sfields["str_allranking"] = 631;
sfields["str_newstitle"] = 632;
sfields["str_newsdata"] = 633;
sfields["str_comment"] = 636;
sfields["str_updatetop"] = 634;
sfields["str_changevalues"] = 635;
</xsl:element>
</head>
<body onload="if(window.translate)translate(); ">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="tl">
<xsl:element name="img">
<xsl:attribute name="src"><xsl:copy-of select="$stylepath"/>/tbl/shim.gif</xsl:attribute>
<xsl:attribute name="width">2</xsl:attribute>
<xsl:attribute name="height">2</xsl:attribute>
</xsl:element>
</td><td class="tm" width="100%"></td>
<td class="tr">
<xsl:element name="img">
<xsl:attribute name="src"><xsl:copy-of select="$stylepath"/>/tbl/shim.gif</xsl:attribute>
<xsl:attribute name="width">2</xsl:attribute>
<xsl:attribute name="height">2</xsl:attribute>
</xsl:element>
</td>
</tr>
<tr>
<td class="ml"></td>
<td width="100%" class="wbox">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr><td valign="top" >
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<TR><TD style="white-space: nowrap;padding-left:30px;"><b><div id="str_newsdata">.</div></b></TD>
<TD width="70%" style="white-space: nowrap;"><b><div id="str_newstitle">.</div></b></TD></TR>
<xsl:apply-templates />
</table>
</td></tr>
</table>
</td>
<td class="mr"></td>
</tr>
<tr>
<td class="ml"></td>
<td valign="top" class="wbox">
<xsl:element name="img">
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="align">right</xsl:attribute>
<xsl:attribute name="src"><xsl:copy-of select="$stylepath"/>star.gif</xsl:attribute>
</xsl:element>
</td>
<td class="mr"></td>
</tr>
<tr>
<td class="bl">
<xsl:element name="img">
<xsl:attribute name="src"><xsl:copy-of select="$stylepath"/>/img/tbl/shim.gif</xsl:attribute>
<xsl:attribute name="width">2</xsl:attribute>
<xsl:attribute name="height">2</xsl:attribute>
</xsl:element>
</td>
<td class="bm"></td>
<td class="br">
<xsl:element name="img">
<xsl:attribute name="src"><xsl:copy-of select="$stylepath"/>/img/tbl/shim.gif</xsl:attribute>
<xsl:attribute name="width">2</xsl:attribute>
<xsl:attribute name="height">2</xsl:attribute>
</xsl:element>
</td>
</tr>
</table>
</body></html>
</xsl:template>
<xsl:template match="news">
<TR>
<TD class="normalbig">
<xsl:element name="div">
<xsl:attribute name="class"><xsl:value-of select="type" /></xsl:attribute>
<xsl:value-of select="date" />
</xsl:element>
</TD>
<TD style="white-space: nowrap;" class="normalbig">
<xsl:element name="a">
<xsl:attribute name="href">javascript:window.external.OpenNews(<xsl:value-of select="id" />);</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="url" /></xsl:attribute>
<xsl:value-of select="title" />
</xsl:element>
</TD>
</TR>
</xsl:template>
</xsl:stylesheet>